<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			//不能有数字，只能是熟悉
			/*var n=window.prompt("yonghuming");
			var reg=/^[a-zA-Z]{6,}$/;
			alert(reg.test(n));*/
			var name=window.prompt("姓名，必须是2-4个汉字");
			//var reg2=/^\W{2,4}$/;
			var reg2=/^[\u4e00-\u9fa5]{2,4}$/;
			alert(reg2.test(name));
	</script>
	</head>
	<body>
	</body>
</html>
